<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>List users</title>
<style type="text/css">
	table,th,td {
		border: 1px solid black;
		border-collapse: collapse;
	}
	
	th,td {
		padding: 5px;
	}
</style>
</head>
<body>
	<span style="font-size: 20px;color: blue">Hello, ${ loginId }</span>
	<h3>List users :</h3>
	<table>
		<thead>
			<tr>
				<th>UserName</th>
				<th>FirstName</th>
				<th>LastName</th>
				<th>IDCardNumber</th>
				<th>Email</th>
			</tr>
		</thead>
		<tbody>
			<c:choose>
				<c:when test="${!empty userList }">
					<c:forEach items="${userList }" var="user">
						<tr>
							<td>${user.loginId }</td>
							<td>${user.firstName }</td>
							<td>${user.lastName }</td>
							<td>${user.idCardNumber }</td>
							<td>${user.email }</td>
						</tr>
					
					
					</c:forEach>
				</c:when>
				<c:otherwise>
					<tr>
						<td colspan="2">
							There is no user
						</td>
					</tr>
				</c:otherwise>
			</c:choose>
		</tbody>
	</table>
</body>
</html>